home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Power Tools
/
Programmer Power Tools.iso
/
c
/
jazlib.arc
/
DISKINFO.C
< prev
next >
Wrap
Text File
|
1986-04-06
|
1KB
|
31 lines
*
┌────────────────────────────────────────────────────────────────────────────┐
│ diskinfo.c │
│ This routine provides low level disk access information by reading the │
│ boot record from the specified disk drive. │
│ │
│ Usage: │
│ int fdrive; /* 0 = 'A', 1 = 'B' etc */ │
│ TDISKBLK wblock; │
│ error = diskinfo(0 &wblock); │
│ │
│ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 │
└────────────────────────────────────────────────────────────────────────────┘
*/
diskinfo ( fdisk , fblock )
int fdisk;
TDISKBLK *fblock;
{
char wbuf[512];
int werr,w;
werr = dosreads(fdisk,0,1,wbuf); /* get boot record */
if (werr) return(werr); /* exit on error */
memcpy(fblock,wbuf,sizeof(TDISKBLK));
return(0);
}